package com.example.authorization_server.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.InMemoryTokenStore;

/**
 * @author 罗俊华
 * @date 2022/3/10 - 3:16 下午
 */
@Slf4j
@Configuration
public class TokenConfig {


    /**
     * 令牌存储的策略
     * @return
     */
    @Bean
    public TokenStore tokenStore(){
        // 内存存储令牌的方式，生成普通令牌
        return new InMemoryTokenStore();
    }
}
